package com.xiaotao.service;

import com.nimbusds.jose.JOSEException;
import com.xiaotao.entity.User;
import com.xiaotao.util.ResponseUtil;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

public interface UserService {
    ResponseUtil queryAll();
    ResponseUtil queryById(Integer id);
    ResponseUtil add(User user);
    ResponseUtil update(User user);
    ResponseUtil delete(Integer id);
    //注册
    ResponseUtil registered(User user);
    ResponseUtil login(User user) throws JOSEException;
    ResponseUtil verify(User user) throws Exception;
    ResponseUtil queryByUserId(Integer id);
    ResponseUtil updateUser(User user);
    ResponseUtil exit() throws Exception;
    ResponseUtil findUserAvatar(Integer id);
    Map<String, Object> uploadFile(MultipartFile file, String bucketName) throws Exception;
    ResponseUtil smsLogin(String mobile, String code) throws JOSEException;
    ResponseUtil checkToken(Integer userId) throws JOSEException;

}
